<{include file="public/header.html"}>
		<div class="xinsu-right">
			<div class="xinsu-right-content">
				<div class="xinsu-data-content">
					<div class="xinsu-title">
						<span class="layui-breadcrumb">
							<a><cite>当前位置</cite></a>
							<a><cite>保证金率</cite></a>
						</span>
					</div>
					<form class="layui-form xinsu-form" action="" method="get">
						<div class="layui-form-item">
						    <div class="layui-inline">
						      	<label class="layui-form-label xinsu-form-label">代理商</label>
						      	<div class="layui-input-inline xinsu-input-inline">
							        <select name="aid">
										<option value="0">全部</option>
										<{foreach $agent as $val}>
										<option value="<{$val.id}>" <{if $aid == $val.id}>selected<{/if}>><{$val.username}></option>
										<{/foreach}>
									</select>
						        </div>
						    </div>
						    <div class="layui-inline">
						      	<label class="layui-form-label xinsu-form-label">账号类型</label>
						      	<div class="layui-input-inline xinsu-input-inline">
							        <select name="demo_account">
										<option value="2">全部</option>
										<option value="0" <{if $demo_account == 0}>selected<{/if}>>正式</option>
										<option value="1" <{if $demo_account == 1}>selected<{/if}>>试玩</option>
									</select>
						        </div>
						    </div>
						    <div class="layui-inline">
						    	<label class="layui-form-label xinsu-form-label">搜索条件</label>
								<div class="layui-input-block xinsu-input-block2">
								    <input type="text" name="username" value="<{if $username != '0'}><{urldecode($username)}><{/if}>" class="layui-input" placeholder="帐号 / 真实姓名"/>
								</div>
						    </div>
						   <button class="layui-btn xinsu-btn">查询</button>
							<span>记录总数：共 <{$total}> 条</span>
						</div>
					</form>
					<div class="layui-form xinsu-form">
						<table class="layui-table">
							<thead>
								<tr>
									<th>ID</th>
									<th>代理商</th>
									<th>员工</th>
									<th>帐号</th>
									<th>姓名</th>
									<th>资金余额</th>
									<th>可用额度</th>
									<th>保证金率</th>
									<th>类型</th>
									<th>状态</th>
									<th>开户日期</th>
									<th>最后登录</th>
									<th>最后登录IP</th>
									<th>操作</th>
								</tr> 
							</thead>
							<tbody>
								<{if empty($list) == false}>
								<{foreach $list as $val}>
								<tr>
									<td><{$val.id}></td>
									<td><{$val.agent_name}></td>
									<td><{$val.staff_name}></td>
									<td><a class="xinsu-fontcolor-blue xinsu-user" href="javascript:;" data="<{$val.id}>"><{$val.username}></a></td>
									<td><{$val.realname}></td>
									<td><{$val.finance}></td>
									<td><{$val.amount}></td>
									<td <{if $val.ratio < 50}>class="xinsu-fontcolor-red"<{/if}>><{$val.ratio}>%</td>
									<{if $val.demo_account == 0}>
									<td class="xinsu-fontcolor-green">正式</td>
									<{else}>
									<td class="xinsu-fontcolor-red">试玩</td>
									<{/if}>
									<{if $val.is_online == 0 || time() - $val.last_login >= 3600}>
									<td>离线</td>
									<{else}>
									<td class="xinsu-fontcolor-red">在线</td>
									<{/if}>
									<td><{date("Y-m-d H:i:s", $val["reg_date"])}></td>
									<td><{date("Y-m-d H:i:s", $val["last_login"])}></td>
									<td><{long2ip($val.ip)}></td>
									<td>
										<a class="xinsu-send-sms xinsu-fontcolor-blue" data-id="<{$val.id}>" href="javascript:;">发信</a>
										<a id="xinsu-locked-<{$val.id}>" class="<{if $val.is_locked == 0}>xinsu-fontcolor-blue<{else}>xinsu-fontcolor-red<{/if}> xinsu-change" href="javascript:;" data="<{$val.id}>"  data-uri="/user/change/locked/<{$val.id}>"><{if $val.is_locked == 1}>解锁<{else}>锁定<{/if}></a>	
										<a id="xinsu-disable-<{$val.id}>" class="<{if $val.is_disable == 0}>xinsu-fontcolor-blue<{else}>xinsu-fontcolor-red<{/if}>  xinsu-change" href="javascript:;" data="<{$val.id}>"  data-uri="/user/change/disable/<{$val.id}>"><{if $val.is_disable == 1}>启用<{else}>禁用<{/if}></a>
										<a id="xinsu-stop-<{$val.id}>" class="<{if $val.is_stop == 0}>xinsu-fontcolor-blue<{else}>xinsu-fontcolor-red<{/if}>  xinsu-change" href="javascript:;" data="<{$val.id}>"  data-uri="/user/change/stop/<{$val.id}>"><{if $val.is_stop == 1}>开仓<{else}>停仓<{/if}></a>
										<a class="xinsu-fontcolor-blue xinsu-amend xinsu-edit" href="javascript:;" data="<{$val.id}>">修改</a>
										<{if $val.id != 1 && $val.id != $_SESSION["admin"]["id"] && $_SESSION["admin"]["role_id"] == 0}>
										<{/if}>
									</td>
								</tr>
								<{/foreach}>
								<{else}>
								<tr>
									<td colspan="11">暂无数据</td>
								</tr>
								<{/if}>
							</tbody>
						</table>
					</div>
					<div class="xinsu-page">
						<div class="xinsu-show">
							<{$page}>
						</div>
						<div class="xinsu-clear"></div>
					</div>
				</div>
			</div>
		</div>
<{include file="public/footer.html"}>
